package a.f.l.a;

import a.c.e;
import a.d.t;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

class bc
  extends sb
{
  private static final double f = 1.0E-006D;
  private int g;
  private e h;
  private e i;
  private t j;
  private t k;
  private a.f.c.h l;
  private boolean m;
  
  protected void c()
  {
    super.c();
    this.h = null;
    this.i = null;
    this.j = null;
    this.k = null;
    this.l = null;
  }
  
  protected void a(qb paramqb)
  {
    super.a(paramqb);
    this.l = paramqb.b();
  }
  
  protected void b(rb paramrb)
  {
    boolean bool = sb.e;
    super.b(paramrb);
    this.g = paramrb.e().f().d();
    if (!bool) {}
    this.m = (this.g > 0);
    if (!bool)
    {
      if (this.m)
      {
        this.h = paramrb.d().e();
        this.i = paramrb.d().f();
        this.j = paramrb.g().h();
      }
    }
    else {
      this.k = paramrb.i().h();
    }
  }
  
  protected double a(h paramh)
  {
    boolean bool3 = sb.e;
    if (!this.m) {
      return 0.0D;
    }
    double d = 0.0D;
    if ((bool3) || (paramh.b() != null))
    {
      mb localmb1 = paramh.a();
      mb localmb2 = paramh.b().a();
      boolean bool1 = a(localmb1);
      boolean bool2 = a(localmb2);
      if ((bool3) || ((bool1) || (bool2))) {
        d += this.g;
      }
    }
    return d;
  }
  
  double[] a(h paramh, mb parammb, jb[] paramArrayOfjb, m[] paramArrayOfm, double[] paramArrayOfDouble)
  {
    boolean bool = sb.e;
    if (!bool)
    {
      if (!this.m) {
        b("punish group node crossing", 0.0D, false);
      }
    }
    else {
      return new double[paramArrayOfjb.length];
    }
    double d = 0.0D;
    if (!bool) {
      if (a(paramh, parammb)) {
        d = this.g;
      }
    }
    double[] arrayOfDouble = new double[paramArrayOfjb.length];
    if (!bool)
    {
      if (d > 0.0D) {
        Arrays.fill(arrayOfDouble, d);
      }
      b("punish group node crossing", d, false);
    }
    return arrayOfDouble;
  }
  
  private boolean a(mb parammb)
  {
    boolean bool = sb.e;
    int n = sb.d;
    Iterator localIterator = b(parammb).iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if (this.l.e(locale))
      {
        if ((bool) || (n != 0)) {
          break label72;
        }
        if (!c(locale)) {
          return true;
        }
      }
    }
    label72:
    return false;
  }
  
  private boolean a(h paramh, mb parammb)
  {
    boolean bool3 = sb.e;
    mb localmb = paramh.a();
    List localList1 = b(localmb);
    List localList2 = b(parammb);
    e locale1 = a(localList1, localList2);
    if (!bool3) {
      if (locale1 != null)
      {
        if (bool3) {
          break label61;
        }
        if (!a(locale1)) {
          return true;
        }
      }
    }
    label61:
    e locale2 = b(localList1, localList2);
    if (locale2 != null)
    {
      boolean bool1 = b(locale2);
      boolean bool2 = a(locale2);
      if (!bool3) {}
      int n = (!bool2) || ((!bool3) && ((bool2) && (locale2 == this.h))) || ((bool1) && (locale2 == this.i)) ? 1 : 0;
      if (bool3) {
        break label154;
      }
      if (n == 0) {
        return true;
      }
    }
    label154:
    return false;
  }
  
  private boolean a(e parame)
  {
    return a(this.k, parame);
  }
  
  private boolean b(e parame)
  {
    return a(this.j, parame);
  }
  
  private boolean a(t paramt, e parame)
  {
    t localt1 = a().a().v(parame);
    t localt2 = new t(localt1.d() - 1.0E-006D, localt1.e() - 1.0E-006D, localt1.b() + 2.0E-006D, localt1.c() + 2.0E-006D);
    return localt2.b(paramt);
  }
  
  private e a(List paramList1, List paramList2)
  {
    boolean bool = sb.e;
    Iterator localIterator = paramList2.iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if (this.l.e(locale)) {
        if (!bool) {
          if (!paramList1.contains(locale)) {
            return locale;
          }
        }
      }
    }
    return null;
  }
  
  private e b(List paramList1, List paramList2)
  {
    boolean bool = sb.e;
    Iterator localIterator = paramList1.iterator();
    while (localIterator.hasNext())
    {
      e locale = (e)localIterator.next();
      if (this.l.e(locale)) {
        if (!bool) {
          if (!paramList2.contains(locale)) {
            return locale;
          }
        }
      }
    }
    return null;
  }
  
  private boolean c(e parame)
  {
    return a(parame, b().d().e());
  }
  
  private boolean a(e parame1, e parame2)
  {
    boolean bool = sb.e;
    int n = sb.d;
    e locale = parame2;
    if (locale != this.l.d())
    {
      if (!bool) {
        if (locale == parame1) {
          return true;
        }
      }
      locale = this.l.b(locale);
    }
    while (bool) {
      if (n == 0) {
        break;
      }
    }
    return false;
  }
  
  private List b(mb parammb)
  {
    return (List)parammb.a(nb.a);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.bc

 * JD-Core Version:    0.7.0.1

 */